package com.zc.campus_shops.util;

public class PathUtil {

	private static String seperator = System.getProperty("file.separator");

	public static String getImgBasePath() {

		String os = System.getProperty("os.name");
		String basePath = "";
		//如果是win系统
		if (os.toLowerCase().startsWith("win")) {
			//路径为
			basePath = "E:/javaee/image";
		} else {
			//其他系统 路径为
			basePath = "/home/zc/image";
		}
		basePath = basePath.replace("/", seperator);
		return basePath;
	}

	public static String getShopImagePath(long shopId) {
		String imagePath = "/upload/item/shop" + shopId + "/";
		return imagePath.replace("/", seperator);
	}
}
